import java.util.Arrays;
import java.util.Locale;

class Dog
{
    String name;
    int age;
    public Dog(String name,int age)
    {
        this.name=name;
        this.age=age;
    }

}




public class text {
    public static void main(String[] args) {
        String c=" hello1 ";
        c=c.trim();
        System.out.println(c);
    }

    public static void main67(String[] args) {
        String b="helloworld";
        System.out.println(b.substring(2,5));
    }
    public static void main63(String[] args) {
        String c="gouba";
        System.out.println(c.substring(2));
    }
        public static void main62(String[] args) {
        String f="good,food&day";
        String[]arr6=f.split(",|&");
        for (String x: arr6) {
            System.out.println(x);

        }


    }
    public static void main61(String[] args) {
        String d="day,day,up";
        String[]arr5=d.split(",");
        for (String x: arr5) {
            System.out.println(x);

        }

    }
    public static void main60(String[] args) {
        String c="i\\love\\you";
        String[]arr4=c.split("\\\\");
        for (String x: arr4) {
            System.out.println(x);

        }


    }
    public static void main59(String[] args) {
        String b="day.day.up";
        String[]arr3=b.split("\\.");
        for (String x: arr3) {
            System.out.println(x);

        }

    }
    public static void main58(String[] args) {
        String a="hello good study";
        String[]arr2=a.split(" ");
        for (String x: arr2) {
            System.out.println(x);

        }

    }
    public static void main57(String[] args) {
        String fg="hello&world&haha";
        String[]arr=fg.split("&",2);
        for (String x: arr) {
            System.out.println(x);

        }

    }


    public static void main55(String[] args) {
        String fh="hellollo";
        System.out.println(fh.replaceAll("llo","www"));
    }

    public static void main54(String[] args) {
        String str="helloworld";
        System.out.println(str.replaceAll("l","t"));
        System.out.println(str.replaceFirst("l","w"));

    }
    public static void main99(String[] args) {
        String s=String.format("%d-%d-%d",2019,9,14);
        System.out.println(s);


    }
    public static void main98(String[] args) {
        String d="abcdefF1";
        char[]f=d.toCharArray();
        for (int i = 0; i < d.length(); i++) {
            System.out.print(f[i]+" ");

        }
        System.out.println();
        char[]arr={'a','b','c'};
        String l=new String(arr);
        System.out.println(l);


        //System.out.println(Arrays.toString(d));

    }
    public static void main97(String[] args) {
        String d="abcdefF1";
        String f="vbHELLO4";
        System.out.println(d.toUpperCase());
        System.out.println(f.toLowerCase());


    }
    public static void main15(String[] args) {
        int a=Integer.parseInt("128");
        double b=Double.parseDouble("15.67");
        System.out.println(a);
        System.out.println(b);
    }
    public static void main14(String[] args) {
        String b=String.valueOf(1234);
        String c=String.valueOf(12.38);
        String d=String.valueOf(new Dog("wang",7));
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);

    }
    public static void main13(String[] args) {
        String l="rghzbfrghzcv";
        System.out.println(l.indexOf("ghz",3));
        System.out.println(l.indexOf("rgh",6));

    }
        public static void main579(String[] args) {
        String l="rghzbfgcv";
        System.out.println(l.indexOf("ghz"));
        System.out.println(l.indexOf("zbf"));
        System.out.println(l.indexOf("gcf"));
    }
    public static void main11(String[] args) {
        String l="rghzbfgcv";
        System.out.println(l.indexOf('c',6));
        System.out.println(l.indexOf('g',2));
    }
    public static void main10(String[] args) {
        String k="abcefgdfg";
        System.out.println(k.indexOf('e'));
        System.out.println(k.indexOf('f'));
        System.out.println(k.indexOf('z'));
    }
    public static void main9(String[] args) {
        String k="abcefgdfg";
        //char b=k.charAt(0);
        System.out.println(k.charAt(1));
        System.out.println(k.charAt(3));
    }

    public static void main8(String[] args) {
        String z="ghoabc";
        String v="gho";


    }



    public static void main7(String[] args) {
        String j="ghoabc";
        String k="gho";
        System.out.println(j.compareTo(k));

    }

    public static void main6(String[] args) {
        String f="hello1";
        String d="hello2";
        if(f==d)
        {
            System.out.println("f=d");
        }
        else
        {
            System.out.println("f!=d");
        }

    }
    public static void main5(String[] args) {
        String c="heelo";
        String b=c;
        if(c==b)
        {
            System.out.println("c=b");
        }
        else
        {
            System.out.println("c!=b");
        }
    }
    public static void main4(String[] args) {
        String c="hello1";
        String d="hello1";


        System.out.println((c.equals(d)));

    }
    public static void main3(String[] args) {
        String c="hello1";
        String d="iello1";


        System.out.println((c.equals(d)));


    }


    public static void main2(String[] args) {
        String a="hello1";
        System.out.println(a.length());
    }
    public static void main1(String[] args) {
        String a="hello1";
        String b=new String("hello2");
        char[]arr={'h','e','l','l','o','3'};
         String c=new String(arr);
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
    }




}
